<%--
  Created by IntelliJ IDEA.
  User: 18075
  Date: 2025/7/11
  Time: 17:33
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<!-- 顶部导航 -->
<nav class="fixed top-0 left-0 right-0 bg-white/80 backdrop-blur-md border-b border-gray-200 z-50">
    <div class="max-w-6xl mx-auto px-4">
        <div class="flex items-center justify-between h-16">
            <div class="flex items-center space-x-8">
                <div class="flex items-center space-x-2">
                    <div
                            class="w-8 h-8 bg-black text-white rounded-full flex items-center justify-center font-bold">
                        Z</div>
                    <span class="text-xl font-bold">时代</span>
                </div>
                <div class="hidden md:flex space-x-6">
                    <a href="index.jsp" class="text-gray-600 hover:text-black transition-colors">首页</a>
                    <a href="explore.jsp" class="text-gray-600 hover:text-black transition-colors">探索</a>
                    <a href="notifications.jsp" class="text-gray-600 hover:text-black transition-colors">通知</a>
                    <a href="messages.jsp" class="text-gray-600 hover:text-black transition-colors">消息</a>
                    <a href="profile.jsp" class="text-gray-600 hover:text-black transition-colors">个人资料</a>
                </div>
            </div>
            <div class="flex items-center space-x-4">
                <div class="relative">
                    <input type="text" placeholder="搜索Z时代"
                           class="w-64 px-4 py-2 bg-gray-100 rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500">
                    <i class="fas fa-search absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-500"></i>
                </div>
                <c:if test="${loginUser != null}">
                    <a href="/zpro/user/logout"
                       class="bg-black text-white px-6 py-2 rounded-full hover:bg-gray-800 transition-colors">
                        退出
                    </a>
                </c:if>
                <c:if test="${loginUser == null}">
                    <a href="login.jsp"
                       class="bg-black text-white px-6 py-2 rounded-full hover:bg-gray-800 transition-colors">
                        登录
                    </a>
                    <a href="register.jsp"
                       class="bg-gray-100 text-gray-900 px-6 py-2 rounded-full hover:bg-gray-200 transition-colors">
                        注册
                    </a>
                </c:if>
                <c:if test="${loginUser != null}">
                    <a href="profile.jsp" class="w-8 h-8 bg-gray-300 rounded-full">
                            ${loginUser.username}
                    </a>
                </c:if>
            </div>
        </div>
    </div>
</nav>
</body>
</html>
